package com.sky.service;

import com.sky.dto.*;
import com.sky.result.PageResult;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderStatisticsVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;

public interface OrdersService  {
    OrderSubmitVO submit(OrdersSubmitDTO ordersSubmitDTO);

    /**
     * 订单支付
     *
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     *
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    /**
     * 用户历史订单查询
     *
 * @param page
 * @param pageSize
 * @param status
     * @return
     * @author heiheiheng
     * @create 2025/8/11
     **/
    PageResult pageQuery4User(int page, int pageSize, Integer status);

    /**
     * 查询订单详情
     * 
 * @param orderId
     * @return 
     * @author heiheiheng
     * @create 2025/8/11
     **/
    OrderVO orderDetail(Long orderId);

    /**
     * 用户取消订单
     * 
 * @param id
     * @return
     * @author heiheiheng
     * @create 2025/8/11
     **/
    void cancelOrder(Long id);

    /**
     * 再来一单
     *
 * @param id
     * @return
     * @author heiheiheng
     * @create 2025/8/11
     **/
    void repetition(Long id);

    /**
     * 商家订单搜索
     *
 * @param ordersPageQueryDTO
     * @return
     * @author heiheiheng
     * @create 2025/8/11
     **/
    PageResult conditionSearch(OrdersPageQueryDTO ordersPageQueryDTO);

    /**
     * 各个状态的订单数量统计
     *
     * @return
     * @author heiheiheng
     * @create 2025/8/11
     **/
    OrderStatisticsVO statistics();

    /**
     * 查询订单详情
     *
 * @param id
     * @return
     * @author heiheiheng
     * @create 2025/8/11
     **/
    OrderVO orderDetails(Long id);

    /**
     * 接单
     *
 * @param ordersConfirmDTO
     * @return
     * @author heiheiheng
     * @create 2025/8/11
     **/
    void confirm(OrdersConfirmDTO ordersConfirmDTO);

    /**
     * 拒单
     *
 * @param ordersRejectionDTO
     * @return
     * @author heiheiheng
     * @create 2025/8/11
     **/
    void rejection(OrdersRejectionDTO ordersRejectionDTO);

    /**
     * 取消订单
     *
 * @param ordersCancelDTO
     * @return
     * @author heiheiheng
     * @create 2025/8/12
     **/
    void cancel(OrdersCancelDTO ordersCancelDTO);

    /**
     * 派送订单
     *
 * @param id
     * @return
     * @author heiheiheng
     * @create 2025/8/12
     **/
    void delivery(Long id);

    /**
     * 完成订单
     *
 * @param id
     * @return
     * @author heiheiheng
     * @create 2025/8/12
     **/
    void complete(Long id);
}
